// $ANTLR 3.5 C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g 2013-01-31 20:48:32

  package lexparser;
  import ast.*;
  import ast.interfaces.*;
  import java.util.LinkedList;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

import org.antlr.runtime.tree.*;


@SuppressWarnings("all")
public class logoParser extends Parser {
	public static final String[] tokenNames = new String[] {
		"<invalid>", "<EOR>", "<DOWN>", "<UP>", "AND", "DIV", "EQ", "FALSE", "IDENT", 
		"LT", "MINUS", "MULT", "NOT", "NUM", "OR", "PLUS", "SEP", "TRUE", "WS", 
		"'('", "')'", "'CALL'", "'FUN'", "'FUNREC'", "'IF'", "'MOVE'", "'PRINT'", 
		"'PROC'", "'PROCREC'", "'SET'", "'TURN'", "'VAR'", "'WHILE'", "'['", "']'"
	};
	public static final int EOF=-1;
	public static final int T__19=19;
	public static final int T__20=20;
	public static final int T__21=21;
	public static final int T__22=22;
	public static final int T__23=23;
	public static final int T__24=24;
	public static final int T__25=25;
	public static final int T__26=26;
	public static final int T__27=27;
	public static final int T__28=28;
	public static final int T__29=29;
	public static final int T__30=30;
	public static final int T__31=31;
	public static final int T__32=32;
	public static final int T__33=33;
	public static final int T__34=34;
	public static final int AND=4;
	public static final int DIV=5;
	public static final int EQ=6;
	public static final int FALSE=7;
	public static final int IDENT=8;
	public static final int LT=9;
	public static final int MINUS=10;
	public static final int MULT=11;
	public static final int NOT=12;
	public static final int NUM=13;
	public static final int OR=14;
	public static final int PLUS=15;
	public static final int SEP=16;
	public static final int TRUE=17;
	public static final int WS=18;

	// delegates
	public Parser[] getDelegates() {
		return new Parser[] {};
	}

	// delegators


	public logoParser(TokenStream input) {
		this(input, new RecognizerSharedState());
	}
	public logoParser(TokenStream input, RecognizerSharedState state) {
		super(input, state);
	}

	protected TreeAdaptor adaptor = new CommonTreeAdaptor();

	public void setTreeAdaptor(TreeAdaptor adaptor) {
		this.adaptor = adaptor;
	}
	public TreeAdaptor getTreeAdaptor() {
		return adaptor;
	}
	@Override public String[] getTokenNames() { return logoParser.tokenNames; }
	@Override public String getGrammarFileName() { return "C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g"; }


	public static class start_return extends ParserRuleReturnScope {
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "start"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:23:1: start : prog ;
	public final logoParser.start_return start() throws RecognitionException {
		logoParser.start_return retval = new logoParser.start_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		ParserRuleReturnScope prog1 =null;


		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:23:7: ( prog )
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:23:9: prog
			{
			root_0 = (Object)adaptor.nil();


			pushFollow(FOLLOW_prog_in_start50);
			prog1=prog();
			state._fsp--;

			adaptor.addChild(root_0, prog1.getTree());

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "start"


	public static class prog_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "prog"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:26:1: prog returns [IAST e] : '[' (op= cmds )? ']' ;
	public final logoParser.prog_return prog() throws RecognitionException {
		logoParser.prog_return retval = new logoParser.prog_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token char_literal2=null;
		Token char_literal3=null;
		ParserRuleReturnScope op =null;

		Object char_literal2_tree=null;
		Object char_literal3_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:27:12: ( '[' (op= cmds )? ']' )
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:27:14: '[' (op= cmds )? ']'
			{
			root_0 = (Object)adaptor.nil();


			char_literal2=(Token)match(input,33,FOLLOW_33_in_prog86); 
			char_literal2_tree = (Object)adaptor.create(char_literal2);
			adaptor.addChild(root_0, char_literal2_tree);

			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:27:20: (op= cmds )?
			int alt1=2;
			int LA1_0 = input.LA(1);
			if ( ((LA1_0 >= 21 && LA1_0 <= 32)) ) {
				alt1=1;
			}
			switch (alt1) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:27:20: op= cmds
					{
					pushFollow(FOLLOW_cmds_in_prog90);
					op=cmds();
					state._fsp--;

					adaptor.addChild(root_0, op.getTree());

					}
					break;

			}

			char_literal3=(Token)match(input,34,FOLLOW_34_in_prog93); 
			char_literal3_tree = (Object)adaptor.create(char_literal3);
			adaptor.addChild(root_0, char_literal3_tree);


			                IASTprog ast = new ASTprog((op!=null?((logoParser.cmds_return)op).e:null));
			                retval.e = ast;
			              
			}

			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "prog"


	public static class cmds_return extends ParserRuleReturnScope {
		public LinkedList<IAST> e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "cmds"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:34:1: cmds returns [LinkedList<IAST> e] : (op1= cmd ( SEP op2= cmds )* |op3= dec ( SEP op4= cmds )* );
	public final logoParser.cmds_return cmds() throws RecognitionException {
		logoParser.cmds_return retval = new logoParser.cmds_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token SEP4=null;
		Token SEP5=null;
		ParserRuleReturnScope op1 =null;
		ParserRuleReturnScope op2 =null;
		ParserRuleReturnScope op3 =null;
		ParserRuleReturnScope op4 =null;

		Object SEP4_tree=null;
		Object SEP5_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:35:12: (op1= cmd ( SEP op2= cmds )* |op3= dec ( SEP op4= cmds )* )
			int alt4=2;
			int LA4_0 = input.LA(1);
			if ( (LA4_0==21||(LA4_0 >= 24 && LA4_0 <= 26)||(LA4_0 >= 29 && LA4_0 <= 30)||LA4_0==32) ) {
				alt4=1;
			}
			else if ( ((LA4_0 >= 22 && LA4_0 <= 23)||(LA4_0 >= 27 && LA4_0 <= 28)||LA4_0==31) ) {
				alt4=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 4, 0, input);
				throw nvae;
			}

			switch (alt4) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:35:14: op1= cmd ( SEP op2= cmds )*
					{
					root_0 = (Object)adaptor.nil();


					pushFollow(FOLLOW_cmd_in_cmds152);
					op1=cmd();
					state._fsp--;

					adaptor.addChild(root_0, op1.getTree());

					             
								                LinkedList<IAST> a = new LinkedList<IAST>();
								                a.add((op1!=null?((logoParser.cmd_return)op1).e:null));
								                retval.e = a;
					                     
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:40:15: ( SEP op2= cmds )*
					loop2:
					while (true) {
						int alt2=2;
						int LA2_0 = input.LA(1);
						if ( (LA2_0==SEP) ) {
							alt2=1;
						}

						switch (alt2) {
						case 1 :
							// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:41:17: SEP op2= cmds
							{
							SEP4=(Token)match(input,SEP,FOLLOW_SEP_in_cmds189); 
							SEP4_tree = (Object)adaptor.create(SEP4);
							adaptor.addChild(root_0, SEP4_tree);

							pushFollow(FOLLOW_cmds_in_cmds193);
							op2=cmds();
							state._fsp--;

							adaptor.addChild(root_0, op2.getTree());


							                      LinkedList<IAST> b = retval.e;
							                      b.addAll((op2!=null?((logoParser.cmds_return)op2).e:null));
							                      retval.e = b;
							                             
							}
							break;

						default :
							break loop2;
						}
					}

					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:47:14: op3= dec ( SEP op4= cmds )*
					{
					root_0 = (Object)adaptor.nil();


					pushFollow(FOLLOW_dec_in_cmds229);
					op3=dec();
					state._fsp--;

					adaptor.addChild(root_0, op3.getTree());

					             
					                      LinkedList<IAST> a = new LinkedList<IAST>();
					                      a.add((op3!=null?((logoParser.dec_return)op3).e:null));
					                      retval.e = a;
					                     
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:52:15: ( SEP op4= cmds )*
					loop3:
					while (true) {
						int alt3=2;
						int LA3_0 = input.LA(1);
						if ( (LA3_0==SEP) ) {
							alt3=1;
						}

						switch (alt3) {
						case 1 :
							// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:53:17: SEP op4= cmds
							{
							SEP5=(Token)match(input,SEP,FOLLOW_SEP_in_cmds266); 
							SEP5_tree = (Object)adaptor.create(SEP5);
							adaptor.addChild(root_0, SEP5_tree);

							pushFollow(FOLLOW_cmds_in_cmds270);
							op4=cmds();
							state._fsp--;

							adaptor.addChild(root_0, op4.getTree());


							                      LinkedList<IAST> b = retval.e;
							                      b.addAll((op4!=null?((logoParser.cmds_return)op4).e:null));
							                      retval.e = b;
							                             
							}
							break;

						default :
							break loop3;
						}
					}

					}
					break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "cmds"


	public static class cmd_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "cmd"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:61:1: cmd returns [IAST e] : ( 'PRINT' op= exp | 'MOVE' op= exp | 'TURN' op= exp | 'CALL' op1= IDENT op2= exp | 'SET' op1= IDENT op2= exp | 'IF' op2= exp op3= prog op4= prog | 'WHILE' op2= exp op3= prog );
	public final logoParser.cmd_return cmd() throws RecognitionException {
		logoParser.cmd_return retval = new logoParser.cmd_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token op1=null;
		Token string_literal6=null;
		Token string_literal7=null;
		Token string_literal8=null;
		Token string_literal9=null;
		Token string_literal10=null;
		Token string_literal11=null;
		Token string_literal12=null;
		ParserRuleReturnScope op =null;
		ParserRuleReturnScope op2 =null;
		ParserRuleReturnScope op3 =null;
		ParserRuleReturnScope op4 =null;

		Object op1_tree=null;
		Object string_literal6_tree=null;
		Object string_literal7_tree=null;
		Object string_literal8_tree=null;
		Object string_literal9_tree=null;
		Object string_literal10_tree=null;
		Object string_literal11_tree=null;
		Object string_literal12_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:62:12: ( 'PRINT' op= exp | 'MOVE' op= exp | 'TURN' op= exp | 'CALL' op1= IDENT op2= exp | 'SET' op1= IDENT op2= exp | 'IF' op2= exp op3= prog op4= prog | 'WHILE' op2= exp op3= prog )
			int alt5=7;
			switch ( input.LA(1) ) {
			case 26:
				{
				alt5=1;
				}
				break;
			case 25:
				{
				alt5=2;
				}
				break;
			case 30:
				{
				alt5=3;
				}
				break;
			case 21:
				{
				alt5=4;
				}
				break;
			case 29:
				{
				alt5=5;
				}
				break;
			case 24:
				{
				alt5=6;
				}
				break;
			case 32:
				{
				alt5=7;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 5, 0, input);
				throw nvae;
			}
			switch (alt5) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:62:14: 'PRINT' op= exp
					{
					root_0 = (Object)adaptor.nil();


					string_literal6=(Token)match(input,26,FOLLOW_26_in_cmd331); 
					string_literal6_tree = (Object)adaptor.create(string_literal6);
					adaptor.addChild(root_0, string_literal6_tree);

					pushFollow(FOLLOW_exp_in_cmd335);
					op=exp();
					state._fsp--;

					adaptor.addChild(root_0, op.getTree());


					                IASTprint ast = new ASTprint((op!=null?((logoParser.exp_return)op).e:null));
					                retval.e = ast;
					              
					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:67:14: 'MOVE' op= exp
					{
					root_0 = (Object)adaptor.nil();


					string_literal7=(Token)match(input,25,FOLLOW_25_in_cmd366); 
					string_literal7_tree = (Object)adaptor.create(string_literal7);
					adaptor.addChild(root_0, string_literal7_tree);

					pushFollow(FOLLOW_exp_in_cmd370);
					op=exp();
					state._fsp--;

					adaptor.addChild(root_0, op.getTree());


					                IASTmove ast = new ASTmove((op!=null?((logoParser.exp_return)op).e:null));
					                retval.e = ast;
					              
					}
					break;
				case 3 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:72:14: 'TURN' op= exp
					{
					root_0 = (Object)adaptor.nil();


					string_literal8=(Token)match(input,30,FOLLOW_30_in_cmd401); 
					string_literal8_tree = (Object)adaptor.create(string_literal8);
					adaptor.addChild(root_0, string_literal8_tree);

					pushFollow(FOLLOW_exp_in_cmd405);
					op=exp();
					state._fsp--;

					adaptor.addChild(root_0, op.getTree());


					                IASTturn ast = new ASTturn((op!=null?((logoParser.exp_return)op).e:null));
					                retval.e = ast;
					              
					}
					break;
				case 4 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:77:14: 'CALL' op1= IDENT op2= exp
					{
					root_0 = (Object)adaptor.nil();


					string_literal9=(Token)match(input,21,FOLLOW_21_in_cmd436); 
					string_literal9_tree = (Object)adaptor.create(string_literal9);
					adaptor.addChild(root_0, string_literal9_tree);

					op1=(Token)match(input,IDENT,FOLLOW_IDENT_in_cmd440); 
					op1_tree = (Object)adaptor.create(op1);
					adaptor.addChild(root_0, op1_tree);

					pushFollow(FOLLOW_exp_in_cmd444);
					op2=exp();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());


					                IASTcall ast = new ASTcall((op1!=null?op1.getText():null),(op2!=null?((logoParser.exp_return)op2).e:null));
					                retval.e = ast;
					              
					}
					break;
				case 5 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:82:14: 'SET' op1= IDENT op2= exp
					{
					root_0 = (Object)adaptor.nil();


					string_literal10=(Token)match(input,29,FOLLOW_29_in_cmd475); 
					string_literal10_tree = (Object)adaptor.create(string_literal10);
					adaptor.addChild(root_0, string_literal10_tree);

					op1=(Token)match(input,IDENT,FOLLOW_IDENT_in_cmd479); 
					op1_tree = (Object)adaptor.create(op1);
					adaptor.addChild(root_0, op1_tree);

					pushFollow(FOLLOW_exp_in_cmd483);
					op2=exp();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());


					                IASTset ast = new ASTset((op1!=null?op1.getText():null),(op2!=null?((logoParser.exp_return)op2).e:null));
					                retval.e = ast;
					              
					}
					break;
				case 6 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:87:14: 'IF' op2= exp op3= prog op4= prog
					{
					root_0 = (Object)adaptor.nil();


					string_literal11=(Token)match(input,24,FOLLOW_24_in_cmd514); 
					string_literal11_tree = (Object)adaptor.create(string_literal11);
					adaptor.addChild(root_0, string_literal11_tree);

					pushFollow(FOLLOW_exp_in_cmd518);
					op2=exp();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					pushFollow(FOLLOW_prog_in_cmd522);
					op3=prog();
					state._fsp--;

					adaptor.addChild(root_0, op3.getTree());

					pushFollow(FOLLOW_prog_in_cmd526);
					op4=prog();
					state._fsp--;

					adaptor.addChild(root_0, op4.getTree());


					                IASTif ast = new ASTif((op2!=null?((logoParser.exp_return)op2).e:null),(op3!=null?((logoParser.prog_return)op3).e:null),(op4!=null?((logoParser.prog_return)op4).e:null));
					                retval.e = ast;
					              
					}
					break;
				case 7 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:92:14: 'WHILE' op2= exp op3= prog
					{
					root_0 = (Object)adaptor.nil();


					string_literal12=(Token)match(input,32,FOLLOW_32_in_cmd557); 
					string_literal12_tree = (Object)adaptor.create(string_literal12);
					adaptor.addChild(root_0, string_literal12_tree);

					pushFollow(FOLLOW_exp_in_cmd561);
					op2=exp();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					pushFollow(FOLLOW_prog_in_cmd565);
					op3=prog();
					state._fsp--;

					adaptor.addChild(root_0, op3.getTree());


					                IASTwhile ast = new ASTwhile((op2!=null?((logoParser.exp_return)op2).e:null),(op3!=null?((logoParser.prog_return)op3).e:null));
					                retval.e = ast;
					              
					}
					break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "cmd"


	public static class dec_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "dec"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:99:1: dec returns [IAST e] : ( 'PROC' op1= IDENT op2= idents '=' op3= prog | 'PROCREC' IDENT idents '=' prog | 'FUN' op1= IDENT op2= idents '=' op3= exp | 'FUNREC' IDENT idents '=' exp | 'VAR' op1= IDENT );
	public final logoParser.dec_return dec() throws RecognitionException {
		logoParser.dec_return retval = new logoParser.dec_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token op1=null;
		Token string_literal13=null;
		Token char_literal14=null;
		Token string_literal15=null;
		Token IDENT16=null;
		Token char_literal18=null;
		Token string_literal20=null;
		Token char_literal21=null;
		Token string_literal22=null;
		Token IDENT23=null;
		Token char_literal25=null;
		Token string_literal27=null;
		ParserRuleReturnScope op2 =null;
		ParserRuleReturnScope op3 =null;
		ParserRuleReturnScope idents17 =null;
		ParserRuleReturnScope prog19 =null;
		ParserRuleReturnScope idents24 =null;
		ParserRuleReturnScope exp26 =null;

		Object op1_tree=null;
		Object string_literal13_tree=null;
		Object char_literal14_tree=null;
		Object string_literal15_tree=null;
		Object IDENT16_tree=null;
		Object char_literal18_tree=null;
		Object string_literal20_tree=null;
		Object char_literal21_tree=null;
		Object string_literal22_tree=null;
		Object IDENT23_tree=null;
		Object char_literal25_tree=null;
		Object string_literal27_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:100:12: ( 'PROC' op1= IDENT op2= idents '=' op3= prog | 'PROCREC' IDENT idents '=' prog | 'FUN' op1= IDENT op2= idents '=' op3= exp | 'FUNREC' IDENT idents '=' exp | 'VAR' op1= IDENT )
			int alt6=5;
			switch ( input.LA(1) ) {
			case 27:
				{
				alt6=1;
				}
				break;
			case 28:
				{
				alt6=2;
				}
				break;
			case 22:
				{
				alt6=3;
				}
				break;
			case 23:
				{
				alt6=4;
				}
				break;
			case 31:
				{
				alt6=5;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 6, 0, input);
				throw nvae;
			}
			switch (alt6) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:100:14: 'PROC' op1= IDENT op2= idents '=' op3= prog
					{
					root_0 = (Object)adaptor.nil();


					string_literal13=(Token)match(input,27,FOLLOW_27_in_dec623); 
					string_literal13_tree = (Object)adaptor.create(string_literal13);
					adaptor.addChild(root_0, string_literal13_tree);

					op1=(Token)match(input,IDENT,FOLLOW_IDENT_in_dec627); 
					op1_tree = (Object)adaptor.create(op1);
					adaptor.addChild(root_0, op1_tree);


					                        
					                      
					pushFollow(FOLLOW_idents_in_dec675);
					op2=idents();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());


					                        
					                      
					char_literal14=(Token)match(input,EQ,FOLLOW_EQ_in_dec724); 
					char_literal14_tree = (Object)adaptor.create(char_literal14);
					adaptor.addChild(root_0, char_literal14_tree);

					pushFollow(FOLLOW_prog_in_dec748);
					op3=prog();
					state._fsp--;

					adaptor.addChild(root_0, op3.getTree());


					                        
					                      
					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:113:14: 'PROCREC' IDENT idents '=' prog
					{
					root_0 = (Object)adaptor.nil();


					string_literal15=(Token)match(input,28,FOLLOW_28_in_dec787); 
					string_literal15_tree = (Object)adaptor.create(string_literal15);
					adaptor.addChild(root_0, string_literal15_tree);

					IDENT16=(Token)match(input,IDENT,FOLLOW_IDENT_in_dec789); 
					IDENT16_tree = (Object)adaptor.create(IDENT16);
					adaptor.addChild(root_0, IDENT16_tree);

					pushFollow(FOLLOW_idents_in_dec791);
					idents17=idents();
					state._fsp--;

					adaptor.addChild(root_0, idents17.getTree());

					char_literal18=(Token)match(input,EQ,FOLLOW_EQ_in_dec793); 
					char_literal18_tree = (Object)adaptor.create(char_literal18);
					adaptor.addChild(root_0, char_literal18_tree);

					pushFollow(FOLLOW_prog_in_dec795);
					prog19=prog();
					state._fsp--;

					adaptor.addChild(root_0, prog19.getTree());

					}
					break;
				case 3 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:114:14: 'FUN' op1= IDENT op2= idents '=' op3= exp
					{
					root_0 = (Object)adaptor.nil();


					string_literal20=(Token)match(input,22,FOLLOW_22_in_dec810); 
					string_literal20_tree = (Object)adaptor.create(string_literal20);
					adaptor.addChild(root_0, string_literal20_tree);

					op1=(Token)match(input,IDENT,FOLLOW_IDENT_in_dec814); 
					op1_tree = (Object)adaptor.create(op1);
					adaptor.addChild(root_0, op1_tree);

					pushFollow(FOLLOW_idents_in_dec818);
					op2=idents();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					char_literal21=(Token)match(input,EQ,FOLLOW_EQ_in_dec820); 
					char_literal21_tree = (Object)adaptor.create(char_literal21);
					adaptor.addChild(root_0, char_literal21_tree);

					pushFollow(FOLLOW_exp_in_dec824);
					op3=exp();
					state._fsp--;

					adaptor.addChild(root_0, op3.getTree());


					                      IASTfun ast = new ASTfun((op1!=null?op1.getText():null),(op2!=null?((logoParser.idents_return)op2).e:null),(op3!=null?((logoParser.exp_return)op3).e:null));
					                      retval.e = ast;
					                    
					}
					break;
				case 4 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:119:14: 'FUNREC' IDENT idents '=' exp
					{
					root_0 = (Object)adaptor.nil();


					string_literal22=(Token)match(input,23,FOLLOW_23_in_dec861); 
					string_literal22_tree = (Object)adaptor.create(string_literal22);
					adaptor.addChild(root_0, string_literal22_tree);

					IDENT23=(Token)match(input,IDENT,FOLLOW_IDENT_in_dec863); 
					IDENT23_tree = (Object)adaptor.create(IDENT23);
					adaptor.addChild(root_0, IDENT23_tree);

					pushFollow(FOLLOW_idents_in_dec865);
					idents24=idents();
					state._fsp--;

					adaptor.addChild(root_0, idents24.getTree());

					char_literal25=(Token)match(input,EQ,FOLLOW_EQ_in_dec867); 
					char_literal25_tree = (Object)adaptor.create(char_literal25);
					adaptor.addChild(root_0, char_literal25_tree);

					pushFollow(FOLLOW_exp_in_dec869);
					exp26=exp();
					state._fsp--;

					adaptor.addChild(root_0, exp26.getTree());

					}
					break;
				case 5 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:120:14: 'VAR' op1= IDENT
					{
					root_0 = (Object)adaptor.nil();


					string_literal27=(Token)match(input,31,FOLLOW_31_in_dec884); 
					string_literal27_tree = (Object)adaptor.create(string_literal27);
					adaptor.addChild(root_0, string_literal27_tree);

					op1=(Token)match(input,IDENT,FOLLOW_IDENT_in_dec888); 
					op1_tree = (Object)adaptor.create(op1);
					adaptor.addChild(root_0, op1_tree);


					                      IASTvar ast = new ASTvar((op1!=null?op1.getText():null));
					                      retval.e = ast;
					                    
					}
					break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "dec"


	public static class idents_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "idents"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:127:1: idents returns [IAST e] : (op1= IDENT |op2= IDENT op3= idents );
	public final logoParser.idents_return idents() throws RecognitionException {
		logoParser.idents_return retval = new logoParser.idents_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token op1=null;
		Token op2=null;
		ParserRuleReturnScope op3 =null;

		Object op1_tree=null;
		Object op2_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:128:12: (op1= IDENT |op2= IDENT op3= idents )
			int alt7=2;
			int LA7_0 = input.LA(1);
			if ( (LA7_0==IDENT) ) {
				int LA7_1 = input.LA(2);
				if ( (LA7_1==EQ) ) {
					alt7=1;
				}
				else if ( (LA7_1==IDENT) ) {
					alt7=2;
				}

				else {
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 7, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 7, 0, input);
				throw nvae;
			}

			switch (alt7) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:128:14: op1= IDENT
					{
					root_0 = (Object)adaptor.nil();


					op1=(Token)match(input,IDENT,FOLLOW_IDENT_in_idents962); 
					op1_tree = (Object)adaptor.create(op1);
					adaptor.addChild(root_0, op1_tree);


					                LinkedList<String> a = new LinkedList<String>();
					                a.add((op1!=null?op1.getText():null));
					                IASTidents ast = new ASTidents(a);
					                retval.e = ast;
					              
					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:135:14: op2= IDENT op3= idents
					{
					root_0 = (Object)adaptor.nil();


					op2=(Token)match(input,IDENT,FOLLOW_IDENT_in_idents995); 
					op2_tree = (Object)adaptor.create(op2);
					adaptor.addChild(root_0, op2_tree);

					pushFollow(FOLLOW_idents_in_idents999);
					op3=idents();
					state._fsp--;

					adaptor.addChild(root_0, op3.getTree());


					                ASTidents a = (ASTidents) (op3!=null?((logoParser.idents_return)op3).e:null);
					                a.getIdents().add((op2!=null?op2.getText():null));
					                retval.e = a;
					              
					}
					break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "idents"


	public static class term_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "term"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:143:1: term returns [IAST e] : (op= IDENT |op= NUM | '(' op1= exp ')' |op= ( TRUE | FALSE ) );
	public final logoParser.term_return term() throws RecognitionException {
		logoParser.term_return retval = new logoParser.term_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token op=null;
		Token char_literal28=null;
		Token char_literal29=null;
		ParserRuleReturnScope op1 =null;

		Object op_tree=null;
		Object char_literal28_tree=null;
		Object char_literal29_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:144:12: (op= IDENT |op= NUM | '(' op1= exp ')' |op= ( TRUE | FALSE ) )
			int alt8=4;
			switch ( input.LA(1) ) {
			case IDENT:
				{
				alt8=1;
				}
				break;
			case NUM:
				{
				alt8=2;
				}
				break;
			case 19:
				{
				alt8=3;
				}
				break;
			case FALSE:
			case TRUE:
				{
				alt8=4;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 8, 0, input);
				throw nvae;
			}
			switch (alt8) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:144:14: op= IDENT
					{
					root_0 = (Object)adaptor.nil();


					op=(Token)match(input,IDENT,FOLLOW_IDENT_in_term1058); 
					op_tree = (Object)adaptor.create(op);
					adaptor.addChild(root_0, op_tree);


					                IASTident ast = new ASTident((op!=null?op.getText():null));
					                retval.e = ast;
					              
					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:149:14: op= NUM
					{
					root_0 = (Object)adaptor.nil();


					op=(Token)match(input,NUM,FOLLOW_NUM_in_term1092); 
					op_tree = (Object)adaptor.create(op);
					adaptor.addChild(root_0, op_tree);


					                IASTnum ast = new ASTnum(Integer.parseInt((op!=null?op.getText():null)));
					                retval.e = ast;
					              
					}
					break;
				case 3 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:154:14: '(' op1= exp ')'
					{
					root_0 = (Object)adaptor.nil();


					char_literal28=(Token)match(input,19,FOLLOW_19_in_term1123); 
					char_literal28_tree = (Object)adaptor.create(char_literal28);
					adaptor.addChild(root_0, char_literal28_tree);

					pushFollow(FOLLOW_exp_in_term1127);
					op1=exp();
					state._fsp--;

					adaptor.addChild(root_0, op1.getTree());

					char_literal29=(Token)match(input,20,FOLLOW_20_in_term1129); 
					char_literal29_tree = (Object)adaptor.create(char_literal29);
					adaptor.addChild(root_0, char_literal29_tree);


					                IASTexp ast = new ASTexp((op1!=null?((logoParser.exp_return)op1).e:null));
					                retval.e = ast;
					              
					}
					break;
				case 4 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:159:14: op= ( TRUE | FALSE )
					{
					root_0 = (Object)adaptor.nil();


					op=input.LT(1);
					if ( input.LA(1)==FALSE||input.LA(1)==TRUE ) {
						input.consume();
						adaptor.addChild(root_0, (Object)adaptor.create(op));
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}

					                IASTbool ast = new ASTbool(Boolean.parseBoolean((op!=null?op.getText():null)));
					                retval.e = ast;              
					              
					}
					break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "term"


	public static class negation_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "negation"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:166:1: negation returns [IAST e] : ( NOT )* op1= term ;
	public final logoParser.negation_return negation() throws RecognitionException {
		logoParser.negation_return retval = new logoParser.negation_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token NOT30=null;
		ParserRuleReturnScope op1 =null;

		Object NOT30_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:167:12: ( ( NOT )* op1= term )
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:167:14: ( NOT )* op1= term
			{
			root_0 = (Object)adaptor.nil();


			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:167:14: ( NOT )*
			loop9:
			while (true) {
				int alt9=2;
				int LA9_0 = input.LA(1);
				if ( (LA9_0==NOT) ) {
					alt9=1;
				}

				switch (alt9) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:167:14: NOT
					{
					NOT30=(Token)match(input,NOT,FOLLOW_NOT_in_negation1219); 
					NOT30_tree = (Object)adaptor.create(NOT30);
					adaptor.addChild(root_0, NOT30_tree);

					}
					break;

				default :
					break loop9;
				}
			}

			pushFollow(FOLLOW_term_in_negation1224);
			op1=term();
			state._fsp--;

			adaptor.addChild(root_0, op1.getTree());

			 retval.e = (op1!=null?((logoParser.term_return)op1).e:null); 

			                 
			              
			}

			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "negation"


	public static class mult_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "mult"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:173:1: mult returns [IAST e] : op1= negation ( DIV op2= negation | MULT op2= negation )* ;
	public final logoParser.mult_return mult() throws RecognitionException {
		logoParser.mult_return retval = new logoParser.mult_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token DIV31=null;
		Token MULT32=null;
		ParserRuleReturnScope op1 =null;
		ParserRuleReturnScope op2 =null;

		Object DIV31_tree=null;
		Object MULT32_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:174:12: (op1= negation ( DIV op2= negation | MULT op2= negation )* )
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:174:14: op1= negation ( DIV op2= negation | MULT op2= negation )*
			{
			root_0 = (Object)adaptor.nil();


			pushFollow(FOLLOW_negation_in_mult1285);
			op1=negation();
			state._fsp--;

			adaptor.addChild(root_0, op1.getTree());

			 retval.e = (op1!=null?((logoParser.negation_return)op1).e:null); 
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:175:14: ( DIV op2= negation | MULT op2= negation )*
			loop10:
			while (true) {
				int alt10=3;
				int LA10_0 = input.LA(1);
				if ( (LA10_0==DIV) ) {
					alt10=1;
				}
				else if ( (LA10_0==MULT) ) {
					alt10=2;
				}

				switch (alt10) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:176:18: DIV op2= negation
					{
					DIV31=(Token)match(input,DIV,FOLLOW_DIV_in_mult1324); 
					DIV31_tree = (Object)adaptor.create(DIV31);
					adaptor.addChild(root_0, DIV31_tree);

					pushFollow(FOLLOW_negation_in_mult1328);
					op2=negation();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					 retval.e = new ASTdiv(retval.e,(op2!=null?((logoParser.negation_return)op2).e:null)); 
					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:177:18: MULT op2= negation
					{
					MULT32=(Token)match(input,MULT,FOLLOW_MULT_in_mult1350); 
					MULT32_tree = (Object)adaptor.create(MULT32);
					adaptor.addChild(root_0, MULT32_tree);

					pushFollow(FOLLOW_negation_in_mult1354);
					op2=negation();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					 retval.e = new ASTmult(retval.e,(op2!=null?((logoParser.negation_return)op2).e:null)); 
					}
					break;

				default :
					break loop10;
				}
			}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "mult"


	public static class add_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "add"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:181:1: add returns [IAST e] : op1= mult ( PLUS op2= mult | MINUS op2= mult )* ;
	public final logoParser.add_return add() throws RecognitionException {
		logoParser.add_return retval = new logoParser.add_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token PLUS33=null;
		Token MINUS34=null;
		ParserRuleReturnScope op1 =null;
		ParserRuleReturnScope op2 =null;

		Object PLUS33_tree=null;
		Object MINUS34_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:182:12: (op1= mult ( PLUS op2= mult | MINUS op2= mult )* )
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:182:14: op1= mult ( PLUS op2= mult | MINUS op2= mult )*
			{
			root_0 = (Object)adaptor.nil();


			pushFollow(FOLLOW_mult_in_add1418);
			op1=mult();
			state._fsp--;

			adaptor.addChild(root_0, op1.getTree());

			retval.e = (op1!=null?((logoParser.mult_return)op1).e:null);
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:183:15: ( PLUS op2= mult | MINUS op2= mult )*
			loop11:
			while (true) {
				int alt11=3;
				int LA11_0 = input.LA(1);
				if ( (LA11_0==PLUS) ) {
					alt11=1;
				}
				else if ( (LA11_0==MINUS) ) {
					alt11=2;
				}

				switch (alt11) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:184:19: PLUS op2= mult
					{
					PLUS33=(Token)match(input,PLUS,FOLLOW_PLUS_in_add1456); 
					PLUS33_tree = (Object)adaptor.create(PLUS33);
					adaptor.addChild(root_0, PLUS33_tree);

					pushFollow(FOLLOW_mult_in_add1460);
					op2=mult();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					 retval.e = new ASTplus(retval.e,(op2!=null?((logoParser.mult_return)op2).e:null)); 
					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:185:19: MINUS op2= mult
					{
					MINUS34=(Token)match(input,MINUS,FOLLOW_MINUS_in_add1482); 
					MINUS34_tree = (Object)adaptor.create(MINUS34);
					adaptor.addChild(root_0, MINUS34_tree);

					pushFollow(FOLLOW_mult_in_add1486);
					op2=mult();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					 retval.e = new ASTminus(retval.e,(op2!=null?((logoParser.mult_return)op2).e:null)); 
					}
					break;

				default :
					break loop11;
				}
			}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "add"


	public static class relation_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "relation"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:189:1: relation returns [IAST e] : op1= add ( LT op2= add | EQ op2= add )* ;
	public final logoParser.relation_return relation() throws RecognitionException {
		logoParser.relation_return retval = new logoParser.relation_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token LT35=null;
		Token EQ36=null;
		ParserRuleReturnScope op1 =null;
		ParserRuleReturnScope op2 =null;

		Object LT35_tree=null;
		Object EQ36_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:190:12: (op1= add ( LT op2= add | EQ op2= add )* )
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:190:14: op1= add ( LT op2= add | EQ op2= add )*
			{
			root_0 = (Object)adaptor.nil();


			pushFollow(FOLLOW_add_in_relation1544);
			op1=add();
			state._fsp--;

			adaptor.addChild(root_0, op1.getTree());

			retval.e = (op1!=null?((logoParser.add_return)op1).e:null);
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:191:15: ( LT op2= add | EQ op2= add )*
			loop12:
			while (true) {
				int alt12=3;
				int LA12_0 = input.LA(1);
				if ( (LA12_0==LT) ) {
					alt12=1;
				}
				else if ( (LA12_0==EQ) ) {
					alt12=2;
				}

				switch (alt12) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:192:19: LT op2= add
					{
					LT35=(Token)match(input,LT,FOLLOW_LT_in_relation1582); 
					LT35_tree = (Object)adaptor.create(LT35);
					adaptor.addChild(root_0, LT35_tree);

					pushFollow(FOLLOW_add_in_relation1586);
					op2=add();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					retval.e = new ASTlt(retval.e,(op2!=null?((logoParser.add_return)op2).e:null));
					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:193:19: EQ op2= add
					{
					EQ36=(Token)match(input,EQ,FOLLOW_EQ_in_relation1608); 
					EQ36_tree = (Object)adaptor.create(EQ36);
					adaptor.addChild(root_0, EQ36_tree);

					pushFollow(FOLLOW_add_in_relation1612);
					op2=add();
					state._fsp--;

					adaptor.addChild(root_0, op2.getTree());

					retval.e = new ASTeq(retval.e,(op2!=null?((logoParser.add_return)op2).e:null));
					}
					break;

				default :
					break loop12;
				}
			}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "relation"


	public static class exp_return extends ParserRuleReturnScope {
		public IAST e;
		Object tree;
		@Override
		public Object getTree() { return tree; }
	};


	// $ANTLR start "exp"
	// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:197:1: exp returns [IAST e] : op1= relation ( AND relation | OR relation )* ;
	public final logoParser.exp_return exp() throws RecognitionException {
		logoParser.exp_return retval = new logoParser.exp_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token AND37=null;
		Token OR39=null;
		ParserRuleReturnScope op1 =null;
		ParserRuleReturnScope relation38 =null;
		ParserRuleReturnScope relation40 =null;

		Object AND37_tree=null;
		Object OR39_tree=null;

		try {
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:198:12: (op1= relation ( AND relation | OR relation )* )
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:198:14: op1= relation ( AND relation | OR relation )*
			{
			root_0 = (Object)adaptor.nil();


			pushFollow(FOLLOW_relation_in_exp1675);
			op1=relation();
			state._fsp--;

			adaptor.addChild(root_0, op1.getTree());

			retval.e = (op1!=null?((logoParser.relation_return)op1).e:null);
			// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:199:15: ( AND relation | OR relation )*
			loop13:
			while (true) {
				int alt13=3;
				int LA13_0 = input.LA(1);
				if ( (LA13_0==AND) ) {
					alt13=1;
				}
				else if ( (LA13_0==OR) ) {
					alt13=2;
				}

				switch (alt13) {
				case 1 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:200:19: AND relation
					{
					AND37=(Token)match(input,AND,FOLLOW_AND_in_exp1714); 
					AND37_tree = (Object)adaptor.create(AND37);
					adaptor.addChild(root_0, AND37_tree);

					pushFollow(FOLLOW_relation_in_exp1716);
					relation38=relation();
					state._fsp--;

					adaptor.addChild(root_0, relation38.getTree());

					}
					break;
				case 2 :
					// C:\\Users\\Hamouda\\workspace\\CL\\src\\grammaire\\logo.g:201:19: OR relation
					{
					OR39=(Token)match(input,OR,FOLLOW_OR_in_exp1736); 
					OR39_tree = (Object)adaptor.create(OR39);
					adaptor.addChild(root_0, OR39_tree);

					pushFollow(FOLLOW_relation_in_exp1738);
					relation40=relation();
					state._fsp--;

					adaptor.addChild(root_0, relation40.getTree());

					}
					break;

				default :
					break loop13;
				}
			}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "exp"

	// Delegated rules



	public static final BitSet FOLLOW_prog_in_start50 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_33_in_prog86 = new BitSet(new long[]{0x00000005FFE00000L});
	public static final BitSet FOLLOW_cmds_in_prog90 = new BitSet(new long[]{0x0000000400000000L});
	public static final BitSet FOLLOW_34_in_prog93 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_cmd_in_cmds152 = new BitSet(new long[]{0x0000000000010002L});
	public static final BitSet FOLLOW_SEP_in_cmds189 = new BitSet(new long[]{0x00000001FFE00000L});
	public static final BitSet FOLLOW_cmds_in_cmds193 = new BitSet(new long[]{0x0000000000010002L});
	public static final BitSet FOLLOW_dec_in_cmds229 = new BitSet(new long[]{0x0000000000010002L});
	public static final BitSet FOLLOW_SEP_in_cmds266 = new BitSet(new long[]{0x00000001FFE00000L});
	public static final BitSet FOLLOW_cmds_in_cmds270 = new BitSet(new long[]{0x0000000000010002L});
	public static final BitSet FOLLOW_26_in_cmd331 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_cmd335 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_25_in_cmd366 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_cmd370 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_30_in_cmd401 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_cmd405 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_21_in_cmd436 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_IDENT_in_cmd440 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_cmd444 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_29_in_cmd475 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_IDENT_in_cmd479 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_cmd483 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_24_in_cmd514 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_cmd518 = new BitSet(new long[]{0x0000000200000000L});
	public static final BitSet FOLLOW_prog_in_cmd522 = new BitSet(new long[]{0x0000000200000000L});
	public static final BitSet FOLLOW_prog_in_cmd526 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_32_in_cmd557 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_cmd561 = new BitSet(new long[]{0x0000000200000000L});
	public static final BitSet FOLLOW_prog_in_cmd565 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_27_in_dec623 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_IDENT_in_dec627 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_idents_in_dec675 = new BitSet(new long[]{0x0000000000000040L});
	public static final BitSet FOLLOW_EQ_in_dec724 = new BitSet(new long[]{0x0000000200000000L});
	public static final BitSet FOLLOW_prog_in_dec748 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_28_in_dec787 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_IDENT_in_dec789 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_idents_in_dec791 = new BitSet(new long[]{0x0000000000000040L});
	public static final BitSet FOLLOW_EQ_in_dec793 = new BitSet(new long[]{0x0000000200000000L});
	public static final BitSet FOLLOW_prog_in_dec795 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_22_in_dec810 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_IDENT_in_dec814 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_idents_in_dec818 = new BitSet(new long[]{0x0000000000000040L});
	public static final BitSet FOLLOW_EQ_in_dec820 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_dec824 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_23_in_dec861 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_IDENT_in_dec863 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_idents_in_dec865 = new BitSet(new long[]{0x0000000000000040L});
	public static final BitSet FOLLOW_EQ_in_dec867 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_dec869 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_31_in_dec884 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_IDENT_in_dec888 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_IDENT_in_idents962 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_IDENT_in_idents995 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_idents_in_idents999 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_IDENT_in_term1058 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_NUM_in_term1092 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_19_in_term1123 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_exp_in_term1127 = new BitSet(new long[]{0x0000000000100000L});
	public static final BitSet FOLLOW_20_in_term1129 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_set_in_term1162 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_NOT_in_negation1219 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_term_in_negation1224 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_negation_in_mult1285 = new BitSet(new long[]{0x0000000000000822L});
	public static final BitSet FOLLOW_DIV_in_mult1324 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_negation_in_mult1328 = new BitSet(new long[]{0x0000000000000822L});
	public static final BitSet FOLLOW_MULT_in_mult1350 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_negation_in_mult1354 = new BitSet(new long[]{0x0000000000000822L});
	public static final BitSet FOLLOW_mult_in_add1418 = new BitSet(new long[]{0x0000000000008402L});
	public static final BitSet FOLLOW_PLUS_in_add1456 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_mult_in_add1460 = new BitSet(new long[]{0x0000000000008402L});
	public static final BitSet FOLLOW_MINUS_in_add1482 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_mult_in_add1486 = new BitSet(new long[]{0x0000000000008402L});
	public static final BitSet FOLLOW_add_in_relation1544 = new BitSet(new long[]{0x0000000000000242L});
	public static final BitSet FOLLOW_LT_in_relation1582 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_add_in_relation1586 = new BitSet(new long[]{0x0000000000000242L});
	public static final BitSet FOLLOW_EQ_in_relation1608 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_add_in_relation1612 = new BitSet(new long[]{0x0000000000000242L});
	public static final BitSet FOLLOW_relation_in_exp1675 = new BitSet(new long[]{0x0000000000004012L});
	public static final BitSet FOLLOW_AND_in_exp1714 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_relation_in_exp1716 = new BitSet(new long[]{0x0000000000004012L});
	public static final BitSet FOLLOW_OR_in_exp1736 = new BitSet(new long[]{0x00000000000A3180L});
	public static final BitSet FOLLOW_relation_in_exp1738 = new BitSet(new long[]{0x0000000000004012L});
}
